home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1995 November / EnigmA AMIGA RUN 02 (1995)(G.R. Edizioni)(IT)[!][issue 1995-11][Skylink CD].iso / earcd / patch / ps3c.lha / 3.0cUpdate / Macros.LHA / TechReport.rexx < prev   
OS/2 REXX Batch file  |  1994-11-01  |  10KB  |  347 lines

  1. /* $VER: TechReport.rexx 1.0c (01.11.94)
  2.    Copyright 1994 Soft-Logik Publishing Corporation
  3.    May not be distributed without Soft-Logik Publishing Corporation's express written permission */
  4.  
  5. /* SAME OLD STUFF */
  6. OPTIONS RESULTS
  7. TRACE OFF
  8. ADDRESS COMMAND
  9. /* Make sure rexx support is opened */
  10. IF ~SHOW('L','rexxsupport.library') THEN
  11.    CALL ADDLIB('rexxsupport.library',0,-30)
  12.  
  13. /* DEFINITIONS AND REPORT SETUP */
  14. ofilename='ram:Report.TEXT'
  15. tfilename='t:Report.TEMP'
  16.  
  17. if ~open(.ofile, ofilename, 'W') then return 9
  18. call writeln(.ofile, 'PAGESTREAM 3.0 TECHNICAL SUPPORT REPORT')
  19. call writeln(.ofile, '---------------------------------------')
  20.  
  21. ADDRESS PAGESTREAM
  22. openbusyrequester message "'Preparing report...'" thermometer enabled abort enabled total 100 current 0
  23. bh=result
  24. ADDRESS COMMAND
  25.  
  26.  
  27. /* MAIN LOOP */
  28. call REGINFO()
  29. call SETBUSY (2)
  30. call SYSTEMINFO()
  31. call SETBUSY (5)
  32. call HELPSYSTEM()
  33. call SETBUSY (8)
  34. call ASSIGNS()
  35. call SETBUSY (10)
  36. call PROGRAMS()
  37. call SETBUSY (30)
  38. call LIBS()
  39. call SETBUSY (35)
  40. call FILTERS()
  41. call SETBUSY (65)
  42. call EFFECTS()
  43. call SETBUSY (80)
  44. call ENGINES()
  45. call SETBUSY (95)
  46. call COLORS()
  47. call SETBUSY (100)
  48. call CLEANUP(0)
  49.  
  50.  
  51. REGINFO:
  52. call writeln(.ofile, '')
  53. call writeln(.ofile, 'USER INFORMATION:')
  54. if ~open(.tfile, 'PageStream3:PageStream3.prefs', 'R') then rcode=9
  55.     else rcode=0
  56. user.name='Unknown'
  57. user.comp='Unknown'
  58. user.regn='Unknown'
  59. if rcode=0 then do
  60.     do until eof(.tfile)
  61.         temp=(readln(.tfile))
  62.         if left(temp,8)='USERNAME' then user.name=left(right(temp,length(temp)-10),length(temp)-11)
  63.         if left(temp,8)='USERCOMP' then user.comp=left(right(temp,length(temp)-13),length(temp)-14)
  64.         if left(temp,8)='USERREGN' then parse var temp dum user.regn .
  65.     end
  66.     call close(.tfile)
  67. end
  68. call writeln(.ofile, '  User Name................. '||user.name)
  69. call writeln(.ofile, '  Company................... '||user.comp)
  70. call writeln(.ofile, '  Registration Number....... '||user.regn)
  71. return rcode
  72.  
  73. SYSTEMINFO:
  74. call writeln(.ofile, '')
  75. call writeln(.ofile, 'SYSTEM INFORMATION:')
  76. 'version >'||tfilename
  77. temp=GETTEMP()
  78. call writeln(.ofile, '  '||temp)
  79. 'cpu >'||tfilename
  80. temp=GETTEMP()
  81. call writeln(.ofile, '  '||temp)
  82. call writeln(.ofile, '')
  83. 'avail >'||tfilename
  84. if ~open(.tfile, tfilename, 'R') then return 9
  85. do 4
  86.     temp=readln(.tfile)
  87.     call writeln(.ofile, '  '||temp)
  88. end
  89. call close(.tfile)
  90. return
  91.  
  92. HELPSYSTEM:
  93. call writeln(.ofile, '')
  94. call writeln(.ofile, 'HELP SYSTEM:')
  95. if exists('libs:amigaguide.library') then do
  96.     'version libs:amigaguide.library >'||tfilename
  97.     temp=GETTEMP()
  98.     parse var temp dum ver .
  99.     call writeln(.ofile, '  AmigaGuide.library........ v'||ver)
  100. end
  101. else call writeln(.ofile, '  AmigaGuide.library........ MISSING!')
  102. if exists('sys:Utilities/AmigaGuide') then do
  103.     'version sys:utilities/amigaguide >'||tfilename
  104.     temp=GETTEMP()
  105.     parse var temp dum ver .
  106.     call writeln(.ofile, '  AmigaGuide program........ v'||ver)
  107.     agflag=1
  108. end
  109. else agflag=0
  110. if exists('sys:Utilities/Multiview') then do
  111.     'version sys:utilities/multiview >'||tfilename
  112.     temp=GETTEMP()
  113.     parse var temp dum ver .
  114.     call writeln(.ofile, '  MultiView program......... v'||ver)
  115.     mvflag=1
  116. end
  117. else mvflag=0
  118. if agflag=0 & mvflag=0 then call writeln(.ofile, '  AmigaGuide/Multiview...... MISSING!')
  119. return
  120.  
  121. ASSIGNS:
  122. call writeln(.ofile, '')
  123. call writeln(.ofile, 'ASSIGNS: (AmigaDOS assigns)')
  124.  
  125. /* find out if the softlogik: assign was made */
  126. slassign=showlist('a','SOFTLOGIK')
  127. if slassign=1 then do
  128.     'assign SoftLogik: exists >'||tfilename
  129.     if ~open(.tfile, tfilename, 'R') then return 9
  130.     temp=(readln(.tfile))
  131.     if pos('SOFTLOGIK',upper(temp))~=0 then do
  132.         parse var temp dum line
  133.         line=strip(line,'b')
  134.         call writeln(.ofile, '  SoftLogik................. '||line)
  135.     end
  136.     call close(.tfile)
  137. end
  138. else call writeln(.ofile, '  SoftLogik................. SoftLogik: ASSIGN NOT MADE!')
  139.  
  140. /* find out if the pagestream3: assign was made */
  141. pgsassign=showlist('a','PAGESTREAM3')
  142. if pgsassign=1 then do
  143.     'assign PageStream3: exists >'||tfilename
  144.     if ~open(.tfile, tfilename, 'R') then return 9
  145.     temp=(readln(.tfile))
  146.     if pos('PAGESTREAM3',upper(temp))~=0 then do
  147.         parse var temp dum line
  148.         line=strip(line,'b')
  149.         call writeln(.ofile, '  PageStream3............... '||line)
  150.     end
  151.     call close(.tfile)
  152. end
  153. else call writeln(.ofile, '  PageStream3............... PageStream3: ASSIGN NOT MADE!')
  154.  
  155. /* find out if the fonts assign addition was made */
  156. 'assign fonts: exists >'||tfilename
  157. if ~open(.tfile, tfilename, 'R') then return 9
  158. line=nul
  159. do until eof(.tfile)
  160.     temp=(readln(.tfile))
  161.     if pos('SOFTLOGIK',upper(temp))~=0 & pos('FONTS',upper(temp))~=0 then line=right(temp,length(temp)-pos('+',temp)-1)
  162. end
  163. if line=nul then call writeln(.ofile, '  Fonts..................... SoftLogik:Fonts add ASSIGN NOT MADE!')
  164. call close(.tfile)
  165. call writeln(.ofile, '  Fonts..................... '||line||' add')
  166. return
  167.  
  168. PROGRAMS:
  169. call writeln(.ofile, '')
  170. call writeln(.ofile, 'PROGRAM FILES:')
  171. if exists('PageStream3:PageStream3') then do
  172.     'version PageStream3:PageStream3 >'||tfilename
  173.     temp=GETTEMP()
  174.     parse var temp dum ver ver2 .
  175.     /* for technical reasons, PageStream has version numbers of PageStream3 1.0 instead of PageStream 3.0. Let's make it easier on the user by changing this for the report. */
  176.     ver='3'||right(ver,length(ver)-1)
  177.     if ver2='' then ver2=' '
  178.     call writeln(.ofile, '  PageStream3 program....... v'||ver||' 'ver2)
  179. end
  180. else call writeln(.ofile, '  PageStream3 program....... MISSING!')
  181. if exists('PageStream3:BME') then do
  182.     'version PageStream3:BME >'||tfilename
  183.     temp=GETTEMP()
  184.     parse var temp dum ver ver2 .
  185.     if ver2='' then ver2=' '
  186.     call writeln(.ofile, '  BME program............... v'||ver||' 'ver2)
  187. end
  188. else call writeln(.ofile, '  BME program............... MISSING!')
  189. if exists('PageStream3:PageLiner') then do
  190.     'version PageStream3:PageLiner >'||tfilename
  191.     temp=GETTEMP()
  192.     parse var temp dum ver ver2 .
  193.     if ver2='' then ver2=' '
  194.     call writeln(.ofile, '  PageLiner program......... v'||ver||' 'ver2)
  195. end
  196. else call writeln(.ofile, '  PageLiner program......... MISSING!')
  197. return
  198.  
  199. LIBS:
  200. call writeln(.ofile, '')
  201. call writeln(.ofile, 'SOFTLOGIK:LIBS (program libraries)')
  202. if exists('SoftLogik:Libs/softlogik_app.library') then 'version SoftLogik:Libs/softlogik_app.library >'||tfilename
  203. temp=GETTEMP()
  204. parse var temp dum ver .
  205. call writeln(.ofile, '  softlogik_app.library..... v'||ver)
  206. if exists('SoftLogik:Libs/softlogik_obj.library') then 'version SoftLogik:Libs/softlogik_obj.library >'||tfilename
  207. temp=GETTEMP()
  208. parse var temp dum ver .
  209. call writeln(.ofile, '  softlogik_obj.library..... v'||ver)
  210. if exists('SoftLogik:Libs/slarexxsupport.library') then 'version SoftLogik:Libs/slarexxsupport.library >'||tfilename
  211. temp=GETTEMP()
  212. parse var temp dum ver .
  213. call writeln(.ofile, '  slarexxsupport.library.... v'||ver)
  214. return
  215.  
  216. FILTERS:
  217. call writeln(.ofile, '')
  218. call writeln(.ofile, 'SOFTLOGIK:FILTERS (filter modules)')
  219. if exists('SoftLogik:filters') then do
  220.     call GETFILES('softlogik:filters')
  221.     call SAYVERS('softlogik:filters')
  222.     end
  223. else do
  224.     call writeln(.ofile, '- Filters directory MISSING!')
  225. end
  226. return
  227.  
  228. EFFECTS:
  229. call writeln(.ofile, '')
  230. call writeln(.ofile, 'SOFTLOGIK:EFFECTS (effect modules)')
  231. if exists('SoftLogik:effects') then do
  232.     call GETFILES('softlogik:effects')
  233.     call SAYVERS('softlogik:effects')
  234.     end
  235. else do
  236.     call writeln(.ofile, '- Effects directory MISSING!')
  237. end
  238.  
  239. /* PRINTERS */
  240. call writeln(.ofile, '')
  241. call writeln(.ofile, 'SOFTLOGIK:PRINTERS (printer drivers)')
  242. if exists('SoftLogik:printers') then do
  243.     call GETFILES('softlogik:printers')
  244.     call SAYVERS('softlogik:printers')
  245.     end
  246. else do
  247.     call writeln(.ofile, '- Printers directory MISSING!')
  248. end
  249. return
  250.  
  251. ENGINES:
  252. call writeln(.ofile, '')
  253. call writeln(.ofile, 'SOFTLOGIK:ENGINES (font and text code modules)')
  254. if exists('SoftLogik:engines') then do
  255.     call GETFILES('softlogik:engines')
  256.     call SAYVERS('softlogik:engines')
  257.     end
  258. else do
  259.     call writeln(.ofile, '- Engines directory MISSING!')
  260. end
  261. return
  262.  
  263. COLORS:
  264. call writeln(.ofile, '')
  265. call writeln(.ofile, 'SOFTLOGIK:COLORS (color libraries)')
  266. if exists('SoftLogik:colors') then do
  267.     call GETFILES('softlogik:colors')
  268.     call SAYVERS('softlogik:colors')
  269.     end
  270. else do
  271.     call writeln(.ofile, '- Colors directory MISSING!')
  272. end
  273. return
  274.  
  275.  
  276. GETTEMP:
  277.     if ~open(.tfile, tfilename, 'R') then return 9
  278.     temp=readln(.tfile)
  279.     call close(.tfile)
  280. return temp
  281.  
  282. GETFILES:
  283.     parse arg path
  284.     Files=showdir(path,file,'|')
  285.     fLength=length(Files)
  286.     nList=0
  287.     DO WHILE fLength>0
  288.         cLength=pos('|',Files)
  289.         IF cLength=0 then DO
  290.             cLength=FLength+1
  291.             fLength=0
  292.         END
  293.         cFile=left(Files,cLength-1)
  294.         eFile=right(cFile,cLength-lastpos('.',cFile))
  295.         IF eFile~='.info' THEN DO
  296.             nList=nList+1
  297.             List.nList=cFile
  298.         END
  299.         IF FLength~=0 THEN Files=right(Files,fLength-cLength)
  300.         fLength=fLength-cLength
  301.     END
  302. return
  303.  
  304. SAYVERS:
  305.     parse arg path
  306.     do count=1 to nlist
  307.         if right(list.count,5)~='.info' then do
  308.             if upper(right(list.count,8))='FONTLIST' | upper(list.count)='POSTSCRIPT.EHANDLER' | upper(right(list.count,6))='HEADER' | upper(right(list.count,10))='DICTIONARY' | upper(left(list.count,7))='PANTONE' then do
  309.                 'list "'||path||'/'list.count||'" lformat %l >'||tfilename
  310.                 ver=' '||GETTEMP()||' bytes'
  311.             end
  312.             else do
  313.                 'version '||path||'/'||list.count||' >'||tfilename
  314.                 temp=GETTEMP()
  315.                 parse var temp dum ver ver2 .
  316.                 if ver2='' then ver2=' '
  317.                 ver=' v'||ver||' '||ver2
  318.             end
  319.             call writeln(.ofile,substr('  '||list.count,1,28,'.')||ver)
  320.         end
  321.     end
  322. return
  323.  
  324.  
  325. SETBUSY:
  326.     parse arg value
  327.     ADDRESS PAGESTREAM
  328.     setbusyrequester bh current value
  329.     getbusyrequester bh
  330.     if result=1 then call CLEANUP(1)
  331.     ADDRESS COMMAND
  332. return
  333.  
  334.  
  335. CLEANUP:
  336.     parse arg value
  337.     call close(.ofile)
  338.     ADDRESS PAGESTREAM
  339.     closebusyrequester bh
  340.     ADDRESS COMMAND
  341.     if value=0 then do
  342.         'multiview '||ofilename
  343.         if rc>0 then 'amigaguide '||ofilename
  344.     end
  345.     'delete '||tfilename||' >NIL:'
  346. exit
  347.